package com.csd.action.manager;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.csd.helper.ActionResult;
import com.csd.helper.ProjectState;
import com.csd.service.IProjectService;
import com.csd.vo.ProjectVO;

/**
 * 管理员待登录成绩的申请
 * @author sanmu
 *	<br>创建于2009-12-25
 */
public class ProjectApplyUnregisterScoreListAction {

	private List<ProjectVO> unregisterScoreList;
	
	private String stage;
	
	private IProjectService projectService;

	public List<ProjectVO> getUnregisterScoreList() {
		return unregisterScoreList;
	}

	public void setUnregisterScoreList(List<ProjectVO> unregisterScoreList) {
		this.unregisterScoreList = unregisterScoreList;
	}

	public String getStage() {
		return stage;
	}

	public void setStage(String stage) {
		this.stage = stage;
	}

	public IProjectService getProjectService() {
		return projectService;
	}

	public void setProjectService(IProjectService projectService) {
		this.projectService = projectService;
	}
	
	public String execute()throws Exception{
		String text = ActionResult.fail;
		String state="";
		if(stage.equals("1"))
			state = ProjectState.prophase;
		else if(stage.equals("2"))
			state = ProjectState.metaphase;
		else if(stage.equals("3"))
			state = ProjectState.finishCheck;
		else
			return text;
		//列出未初期评审登录成绩的项目
		unregisterScoreList = projectService.listUnregisterScoreProject(state);
		text = ActionResult.success;
		return text;
	}
}
